import Bean.life;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class LifecycleTest {
    public static void main(String[] args) {
        //加载lifecycle.xml配置文件
        ApplicationContext context;
        context = new ClassPathXmlApplicationContext("lifecycle.xml");
        //获取lifecycle对象
        life life = (Bean.life) context.getBean("life");
        life.print();





    }
}
